$color: #23ade5;

.bilibili-live-recorder {
    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }

    display: flex;
    position: fixed;
    z-index: 9999;
    top: 100px;
    right: 100px;
    width: 190px;
    height: 60px;
    font-size: 12px;
    border-radius: 60px;
    overflow: hidden;
    user-select: none;
    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji,
        Segoe UI Emoji;
    line-height: 1;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.9);
    box-shadow: 0 0 20px 0 rgba(0, 85, 255, 0.3);

    .blr-states {
        display: flex;
        width: 60px;
        height: 60px;
        padding: 5px;
        color: rgba(255, 255, 255, 0.8);
        text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);

        .blr-state {
            position: relative;
            display: none;
            height: 100%;
            width: 100%;
            justify-content: center;
            align-items: center;
            text-align: center;
            cursor: pointer;
            border-radius: 50%;
            transition: all 0.2s ease;
            transform: scale3d(1, 1, 1);

            &.blr-active {
                display: flex;
            }

            &:hover {
                transform: scale3d(1.1, 1.1, 1.1);
            }

            &:active {
                transform: scale3d(0.9, 0.9, 0.9);
            }

            @keyframes rotate {
                from {
                    transform: rotate(0deg);
                }
                to {
                    transform: rotate(360deg);
                }
            }

            &.blr-state-before-record {
                background-image: linear-gradient(0deg, #be1974, #ff1c68);
                border: 5px solid rgba(103, 10, 57, 0.8);
            }

            &.blr-state-recording {
                background-image: linear-gradient(0deg, #be1974, #ff1c68);
                border: 5px solid rgba(103, 10, 57, 0.8);

                &::before {
                    content: '';
                    position: absolute;
                    left: 0;
                    top: 0;
                    right: 0;
                    bottom: 0;
                    width: 100%;
                    height: 100%;
                    border-radius: 50%;
                    border: 2px solid #ffeb3b;
                    border-left: 2px solid rgba(255, 255, 255, 0);
                    border-right: 2px solid rgba(255, 255, 255, 0);
                    animation: rotate 3s linear infinite;
                }
            }

            &.blr-state-after-record,
            &.blr-state-wait {
                background-image: linear-gradient(0deg, #007b94, #01b5da);
                border: 5px solid rgba(0, 57, 68, 0.8);

                &::before {
                    content: '';
                    position: absolute;
                    left: 0;
                    top: 0;
                    right: 0;
                    bottom: 0;
                    width: 100%;
                    height: 100%;
                    border-radius: 50%;
                    border: 2px solid #23dfe5;
                    border-left: 2px solid rgba(255, 255, 255, 0);
                    border-right: 2px solid rgba(255, 255, 255, 0);
                    animation: rotate 3s linear infinite;
                }
            }
        }
    }

    .blr-monitors {
        position: relative;
        display: flex;
        flex-direction: column;
        flex: 1;
        letter-spacing: 1px;
        padding: 6px 10px 6px 0;
        color: rgba(255, 255, 255, 0.75);
        text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);

        .blr-monitor {
            display: flex;
            align-items: center;
            flex: 1;
            padding: 0 5px;
            line-height: 1;

            .blr-monitor-name {
                width: 40px;
            }

            .blr-monitor-value {
                flex: 1;
                text-overflow: ellipsis;
                white-space: nowrap;
                overflow: hidden;
            }
        }

        .blr-monitor-top {
            border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        }

        &::after {
            content: '';
            position: absolute;
            top: 28px;
            right: 4px;
            width: 5px;
            height: 5px;
            transform: rotate(45deg);
            background: rgba(255, 255, 255, 0.15);
        }
    }

    @keyframes focus {
        0% {
            box-shadow: 0 0 0 2px rgba(255, 235, 59, 1);
        }
        50% {
            box-shadow: 0 0 0 2px rgba(255, 235, 59, 0);
        }
        100% {
            box-shadow: 0 0 0 2px rgba(255, 235, 59, 1);
        }
    }

    &.blr-focus {
        animation: focus 1s linear infinite;
    }
}
